#!/bin/sh
mkdir -p /usr/local/bin

echo "mono ${SYNOPKG_PKGDEST}/Duplicati.CommandLine.exe $@" > "/usr/local/bin/duplicati-cli" 
chmod +x "/usr/local/bin/duplicati-cli"

echo "" >> "${SYNOPKG_PKGDEST}/webroot/nph-proxy.cgi"
echo "mono ${SYNOPKG_PKGDEST}/CGIProxyHandler.exe" >> "${SYNOPKG_PKGDEST}/webroot/nph-proxy.cgi"
chmod +x "${SYNOPKG_PKGDEST}/webroot/nph-proxy.cgi"

exit 0